package Tests;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import DataReading.AlarmList;
import DataReading.Alarm;


public class AlarmListTest {
	
	private static AlarmList alarmList;
	private static Alarm[] list;
	private static Alarm v;
	
	@BeforeClass
	public static void setUpBeforeClass() throws Exception{
		alarmList = new AlarmList(10);
		list = alarmList.getList();
	}
	
	@Test
	public void testAlarmList(){
		assertNotNull(alarmList); // testing if not null
	}
	
	@Test
	public void testGetAlarmAtIndex(){
		assertSame(list[5],alarmList.getAlarmAtIndex(5));
	}
	
	@Test
	public void testSetAlarmAtIndex(){
		assertSame(v, alarmList.getAlarmAtIndex(5));
	}
	
	@Test
	public void testAdd(){
		assertSame(v, alarmList.getAlarmAtIndex(5));
	}
	
	
	@Test
	public void testRemove(){
		assertNull(list[5]);
	}
	
	@Test
	public void testExpandValues(){
		assertEquals(20, list.length*2);
	}
	
	/*@Test //not ready for testing yet
	public void testTrimList(){
		
	}*/
	
	
}
